#include "task_factory.hpp"
#include "task_server_cmd.hpp"
#include "task_query.hpp"
#include "file_download.hpp"
#include "file_upload.hpp"
#include "task_port.hpp"
#include <glog/logging.h>
task_factory::task_factory(/* args */)
{
}

task_factory::~task_factory()
{
}
task_factory* task_factory::getInstance()
{
    static task_factory t;
    return &t;
}
thread_task* task_factory::create_task()
{
    task_server_cmd* cmd = new task_server_cmd();
    task_query *query = new task_query;
    file_download* file = new file_download();

    task_port* port = new task_port();
    VLOG(0)<<"create query";
    cmd->registration_command("LIST",query);
    cmd->registration_command("download",file); 
    cmd->registration_command("PORT",port);
    return cmd;
}